﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Boiling.BizFacade;

namespace Boiling.Web
{
    public partial class HomePage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session.Contents["userID"] == null)
            {
                Response.Redirect("default.aspx");
            }
            c_News[] m_News =  new NewsManager().GetNewsNotReadByUseridReturnClass((string)Session.Contents["userID"]);
            Session.Add("myNews", m_News);
        }

        public void LinkButton_Click(Object sender, EventArgs e)
        {
            
            if (Session.Contents["userID"] != null)
            {
                Session.Remove("userID");
            }
            Response.Redirect("Default.aspx");
        }

    }
}
